<?php if (!defined('SERVER_ROOT')) exit('No direct script access allowed');

class canbotheohocvi_Controller extends Controller {
    function __construct(){
        parent::__construct('tracuu', 'canbotheohocvi');
        $this->check_login();
        $this->view->template->menu_html =$this->CREATE_MENU();
        $this->view->template->nhacviec_html =$this->CREATE_NHAC_VIEC();
        $this->CHECK_QUYEN('tracuu', 'canbotheohocvi');
    }

    function main(){
        (Session::get(TIEP_DAU_NGU_SESSION.'QUAN_TRI') == 1) Or die($this->access_denied());
        $this->dsp_all_canbo();
    }
    private function _save_filter(){
        $v_MA_HOC_VI = $this->get_post_var('cbx_MA_HOC_VI');
        return array(
            'cbx_MA_HOC_VI'=> $v_MA_HOC_VI,
        );
    }
    function dsp_all_canbo(){
        $arr_filter = $this-> _save_filter();
        $VIEW_DATA['arr_filter']       = $arr_filter;
        $VIEW_DATA['arr_all_canbo']= $this->model->SELECT_DSCB_THEO_HOC_VI();
        $VIEW_DATA['arr_all_hocvi']       = $this->model->SELECT_HOCVI_tatca();
        $this->view->render('dsp_all_canbo', $VIEW_DATA);
    }
    function dsp_incanbo($MA_HOC_VI){
        $VIEW_DATA['arr_all_canbo']= $this->model->SELECT_DSCB_THEO_HOC_VI2($MA_HOC_VI);
        $this->view->render('dsp_incanbo', $VIEW_DATA);
    }
}